package com.ruoyi.recipe.domain;

import com.ruoyi.common.utils.StringUtils;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

import java.util.ArrayList;
import java.util.List;

/**
 * 菜品对象 recipe_dish
 * 
 * @author ruoyi
 * @date 2024-11-22
 */
public class RecipeDish extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 菜品ID */
    private Long dishId;

    /** 菜品编号 */
    @Excel(name = "菜品编号")
    private String dishCode;

    /** 菜品名称 */
    @Excel(name = "菜品名称")
    private String dishName;

    /** 菜品标题 */
    @Excel(name = "菜品标题")
    private String dishTitle;

    /** 菜品排序 */
    private Integer dishSort;

    /** 菜品描述 */
    @Excel(name = "菜品描述")
    private String dishContent;

    /** 菜品图片 */
    @Excel(name = "菜品图片")
    private String dishPic;

    /** 作者 */
    @Excel(name = "作者")
    private String author;

    /** 点赞数量 */
    private Integer likesCount;

    /** 状态（0正常 1停用） */
    private String status;

    /** 是否被收藏 */
    private boolean isCollect;

    private String openId;

    /** 菜品类别ID */
    private Long categoryId;

    /** 类别 */
    private String categoryName;

    private int limit;

    private List<String> searchValueList;

    public void setDishId(Long dishId) 
    {
        this.dishId = dishId;
    }

    public Long getDishId() 
    {
        return dishId;
    }

    public String getDishCode() {
        return dishCode;
    }

    public void setDishCode(String dishCode) {
        this.dishCode = dishCode;
    }

    public void setDishName(String dishName) 
    {
        this.dishName = dishName;
    }

    public String getDishName() 
    {
        return dishName;
    }

    public void setDishTitle(String dishTitle) 
    {
        this.dishTitle = dishTitle;
    }

    public String getDishTitle() 
    {
        return dishTitle;
    }

    public void setDishSort(Integer dishSort) 
    {
        this.dishSort = dishSort;
    }

    public Integer getDishSort() 
    {
        return dishSort;
    }

    public void setDishContent(String dishContent) 
    {
        this.dishContent = dishContent;
    }

    public String getDishContent() 
    {
        return dishContent;
    }

    public void setDishPic(String dishPic) 
    {
        this.dishPic = dishPic;
    }

    public String getDishPic() 
    {
        return dishPic;
    }

    public void setLikesCount(Integer likesCount) 
    {
        this.likesCount = likesCount;
    }

    public Integer getLikesCount() 
    {
        return likesCount;
    }

    public void setStatus(String status) 
    {
        this.status = status;
    }

    public String getStatus() 
    {
        return status;
    }

    public boolean getIsCollect() {
        return isCollect;
    }

    public void setIsCollect(boolean isCollect) {
        this.isCollect = isCollect;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public void setCategoryId(Long categoryId)
    {
        this.categoryId = categoryId;
    }

    public Long getCategoryId()
    {
        return categoryId;
    }

    public String getCategoryName() {
        return categoryName;
    }

    public void setCategoryName(String categoryName) {
        this.categoryName = categoryName;
    }

    public int getLimit() {
        return limit;
    }

    public void setLimit(int limit) {
        this.limit = limit;
    }

    public String getAuthor() {
        return author;
    }

    public void setAuthor(String author) {
        this.author = author;
    }

    public List<String> getSearchValueList() {
        return searchValueList;
    }

    public void setSearchValueList(List<String> searchValueList) {
        this.searchValueList = searchValueList;
    }

    @Override
    public void setSearchValue(String searchValue)
    {
        super.setSearchValue(searchValue);

        if (StringUtils.isNotEmpty(searchValue)) {
            String newValue = StringUtils.replace(searchValue, "，", ",");
            this.searchValueList = StringUtils.str2List(newValue, ",", true, true);
        }
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("dishId", getDishId())
            .append("dishCode", getDishCode())
            .append("dishName", getDishName())
            .append("dishTitle", getDishTitle())
            .append("dishSort", getDishSort())
            .append("dishContent", getDishContent())
            .append("dishPic", getDishPic())
            .append("likesCount", getLikesCount())
            .append("status", getStatus())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("remark", getRemark())
            .append("categoryId", getCategoryId())
            .append("author", getAuthor())
            .toString();
    }
}
